package com.wowotou.rabbitmq.consumer;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class PriorityConsumer {
    @RabbitListener(queues = "priority.queue")
    public void receivePrioriyMsg(Message message){
        String msg = new String(message.getBody());
        log.info("消费的消息为："+msg);
    }
}
